home *** CD-ROM | disk | FTP | other *** search
- Path: sn.no!not-for-mail
- From: christon@sn.no (Christopher Naas)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Scaling
- Date: 22 Feb 1996 17:41:21 +0100
- Organization: SN Internett
- Message-ID: <1588.6626T1061T1294@sn.no>
- NNTP-Posting-Host: sinsen.sn.no
- X-Newsreader: THOR 2.21 (Amiga;SOUP)
-
- After having had a look at the BitMapScale (); routine, I'm a bit confused.
- bitscale->bsa_XDestFactor and bitscale->bsa_YDestFactor are defined as
- UWORD's. If I'm thinking correctly, then that means that you can only scale
- *up*, and only in powers of 2, i.e. 320->640 and so on. ??
-
- My question is then; am I wrong? (Hope so), and if so, how do I scale *down*,
- and how do I define a scaling from i.e. 13x13 to 15x15 and the other way
- around, from 15x15 to 13x13?
-
- I have the BitScaleArgs set as:
-
- bitscale->bsa_SrcX = 0; // Source X
- bitscale->bsa_SrcY = 0; // Source Y
- bitscale->bsa_SrcWidth = OWidth; // Soruce Width
- bitscale->bsa_SrcHeight = OHeight; // Source Height
- bitscale->bsa_DestX = 0; // Destination X
- bitscale->bsa_DestY = 0; // Destination Y
- bitscale->bsa_DestWidth = Width; // Destination Width
- bitscale->bsa_DestHeight = Height; // Destination Height
- bitscale->bsa_XDestFactor = // Scale factor numerator X
- bitscale->bsa_YDestFactor = // Scale factor numerator Y
- bitscale->bsa_SrcBitMap = BitMap; // Source BitMap
- bitscale->bsa_DestBitMap = newbitmap; // Destination BitMap
- bitscale->bsa_Flags = NULL; // Reserved - has to be zero!
-
- BitMapScale (bitscale);
-
- ..which I guess is right. My problem lies in the X and Y DestFactor settings.
-
-
- HELP!! ;)
-
- --
- Christopher Landmark Naas o EMail: christon@sn.no
- LoungeBar Development o WWW: http://www.sn.no/~christon/
- Former Reg. Amiga Developer o IRC: KarmaComa
-